package com.basic.business.order.domain;

import com.basic.common.utils.uuid.ULID;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Getter
@Setter
public class TOrdersTimeLine implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    /** 主系统订单号 */
    private String sid;

    private String tid;

    private String shortId;

    private String orderStatus;

    private long accessTime;

    public static TOrdersTimeLine createTOrdersTimeLine(TOrdersStatus status) {
        TOrdersTimeLine timeLine = new TOrdersTimeLine();
        timeLine.setId(ULID.getId());
        timeLine.setSid(status.getSid());
        timeLine.setTid(status.getTid());
        timeLine.setShortId(status.getShortId());
        timeLine.setAccessTime(status.getAccessTime());
        return timeLine;
    }

}
